package org.redis.advice;


import lombok.extern.slf4j.Slf4j;
import org.aspectj.lang.annotation.After;
import org.aspectj.lang.annotation.Aspect;
import org.aspectj.lang.annotation.Pointcut;
import org.redis.service.RedisKeys;
import org.springframework.stereotype.Component;
/**
 * @author admin
 */
@Slf4j
@Aspect
@Component
public class RedisKeyResultAspect {

    @Pointcut("@within(org.springframework.web.bind.annotation.RestController) || @within(org.springframework.web.bind.annotation.RestController)")
    public void pointcut() {
    }

    @After(value = "pointcut()")
    public void afterPerformance() {
        RedisKeys.destroy();
    }
}
